﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace pTools.TuQiangPrint
{
    public class ProductionPlan : INotifyPropertyChanged
    {
        string _planCode;
        [DisplayName("计划单号")]
        public string planCode
        {
            get { return _planCode; }
            set
            {
                if (_planCode != value)
                {
                    if (string.IsNullOrEmpty(value))
                    //throw new Exception();
                    { }
                    else
                    {
                        _planCode = value;
                        OnPropertyChanged();
                    }
                }
            }
        }

        [DisplayName("存货编码")]
        public string proCode { get; set; }

        [DisplayName("名称")]
        public string proName { get; set; }

        [DisplayName("颜色")]
        public string color { get; set; }

        [DisplayName("计划数量")]
        public int planNum { get; set; }

        [DisplayName("商标")]
        public string trademark { get; set; }

        [DisplayName("包装方式")]
        public string packing { get; set; }

        [DisplayName("箱规")]
        public string boxSpec { get; set; }

        [DisplayName("计划报工总数")]
        public int reportQualifiedNum { get; set; }

        [DisplayName("已打印数量")]
        public int printedNum { get; set; }

        public event PropertyChangedEventHandler PropertyChanged;
        protected void OnPropertyChanged([CallerMemberName] string propertyName = "")
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }

        // 行号
        [Display(AutoGenerateField = false, Description = "This column isn't created")]
        public int rowNo { get; set; }

        // 客户
        [Display(AutoGenerateField = false, Description = "This column isn't created")]
        public string customer { get; set; }

        // 生产计划子表id
        [Display(AutoGenerateField = false, Description = "This column isn't created")]
        public int planChild_id { get; set; }

        // u8关联单据
        [Display(AutoGenerateField = false, Description = "This column isn't created")]
        public string u8RelationOrder { get; set; }
        
        // 包装，存放方式 
        [Display(AutoGenerateField = false, Description = "This column isn't created")]
        public string cu_baozhuang { get; set; }
        // 锅号
        [Display(AutoGenerateField = false, Description = "This column isn't created")]
        public string cu_guohao { get; set; }
    }
}
